<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="author" content="zhupeng">
<TITLE>卡片出库管理</TITLE>
<script LANGUAGE="javascript" src="../script/common.js"
	type="text/javascript"></script>
<script language="javascript" type="text/javascript">
			//全局变量
			var org = Common.cOrg();	//当前单位	
			var qt = {};				//数据表格对象
			var cnt = {};
			var parentId;
			//页面加载方法
			function load(){ 
				Eui.showNavigation();
				searchForm.location.value = org.id;
				parentId = org.parent?org.parent:0;
				params = {orgId:org.id,parentId:org.parent?org.parent:0}
				
				Common.initDict(searchForm.cardStatusId,"card_status","全 部");	
				
				Eui.initBeginDateInput("beginDateTd","起始日期","searchForm","beginDate","endDate","_pastDate");
				Eui.initEndDateInput("endDateTd","结束日期","searchForm","beginDate","endDate","_pastDate");
				
				createTable();	
			}  
			//生成表格，创建QueryTable对象(查询)
			function createTable(){
				var columns = [];
				columns[0] = {type:"radio"};	
				columns[6] = {defOrder:true};													
				qt = new QueryTable("card_way_bill","searchForm","datalist",columns);
				qt.showTable();
			}
	
			function onSave(){
				var obj = qt.getRadioValue(true);
				if(obj==null){
					showWarning("请选择一个单据");return;
				}
				dialogBackValue(obj);
			}
		
			function showData(){
			  	qt.showTable();
			}
			function onBack(){
				searchForm.cardType.value = "";
				switchPage('listview');
				createTable()
				showData();
			}	
			function selCardType(){			
				var v = openDialogFrame("/basic/card_type_list.html?",'请选择卡片类型',464,700)
				if (v){
					searchForm.cardType.value = v[1];
				}
			}
		</script>
</head>
<body onload="load()">
<!--页面导航-->
<div class="nav">
<div id="nav">&nbsp;</div>
</div>
<!--查询静态页面部分-->
<div id="listview">
<div class="searchForm">
<form id="searchForm" name="searchForm"><input
	type="hidden" id="location" name="location">
<table cellSpacing=0 cellPadding=4 width="100%" border=0>
	<tr>
		<td><label>单据编号</label> <input type="text" name="outid" onblur="checkV(this,'number')"></td>
		<td><label>卡片类型</label> <input type="text" name="cardType"><a class="orga" title="请选择卡片类型" href="javascript:void(0)" onclick="selCardType()">&nbsp;&nbsp;</a></td>
		<td><label>卡片状态</label> <select name="cardStatusId"> <option></option> </select></td>
	</tr>
	<tr>
		<td id="beginDateTd"></td>
		<td id="endDateTd"></td>
		<td>
		<button type="button" onclick="showData()">查 询</button>
		</td>
	</tr>
</table>
</form>
</div>
<div id="datalist"></div>
</div>

</body>
</HTML>
